package com.agentai.framework.common.utils.treenode;


import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

/**
 * 树节点统一控制类
 *
 * @author yangfei
 * @date: 2020年3月8日 上午11:24:53
 */
@Data
public class TreeEntity implements TreeInter<TreeEntity> {

    @Schema(description = "ID")
    private Long id;

    @Schema(description = "节点名称")
    private String title;

    @Schema(description = "节点编号")
    private String curCode;

    @Schema(description = "父节点编号")
    private String parentCode;

    @Schema(description = "是否展开")
    private boolean expand;

    @Schema(description = "类别")
    private Integer areaType;

    @Schema(description = "是否可用。0：可用1：禁用")
    private Integer isUsable;

    @Schema(description = "x点坐标")
    private String xdot;

    @Schema(description = "y点坐标")
    private String ydot;

    @Schema(description = "子节点集合")
    private List<TreeEntity> children;

    @Override
    public String getCurCode() {
        return this.curCode;
    }

    @Override
    public String getParentCode() {
        return this.parentCode;
    }

    @Override
    public void setChildList(List<TreeEntity> childList) {
        this.children = childList;
    }

    @Override
    public void setIsExpland(boolean flag) {
        // TODO Auto-generated method stub
        this.expand = flag;
    }


}
